package com.wodsy.phoenix.dataservice.shoppingcart.service.impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.wodsy.phoenix.datadao.base.IBaseDao;
import com.wodsy.phoenix.datadao.shoppingcart.dao.ShoppingcartItemRedisDao;
import com.wodsy.phoenix.dataobject.shoppingcart.model.ShoppingcartItem;
import com.wodsy.phoenix.dataservice.base.AbstractBaseService;
import com.wodsy.phoenix.dataservice.shoppingcart.service.ShoppingcartItemService;



@Service(interfaceClass=ShoppingcartItemService.class,interfaceName="com.wodsy.phoenix.dataservice.shoppingcart.service.ShoppingcartItemService" )
public class ShoppingcartItemServiceImpl  extends AbstractBaseService<ShoppingcartItem, Integer> implements ShoppingcartItemService {
	@Autowired
	private ShoppingcartItemRedisDao shoppingcartItemRedisDao;

	@Override
	public List<ShoppingcartItem> getMyShoppingcartItemListByUid(Integer userId) {
		return shoppingcartItemRedisDao.getMyShoppingcartItemListByUid(userId);
	}
	@Override
	public void addMyShoppingcartItem(Integer userId,ShoppingcartItem shoppingcartItem) {
		shoppingcartItemRedisDao.addMyShoppingcartItem(userId, shoppingcartItem);
	}
	@Override
	public void updateShoppingcartItem(Integer userId,ShoppingcartItem shoppingcartItem) {
		shoppingcartItemRedisDao.updateShoppingcartItem(userId, shoppingcartItem);
	}
	
	@Override
	public void delShoppingcartItem(Integer userId, Integer shopId,
			Integer skuId) {
		shoppingcartItemRedisDao.delShoppingcartItem(userId, shopId,skuId);
	}
	
	@Override
	protected IBaseDao<ShoppingcartItem, Integer> getIBaseDao() {
		// TODO Auto-generated method stub
		return null;
	}
	public static void main(String[] args) {
		com.alibaba.dubbo.container.Main.main(args);
	}
}
